﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QuickTools.MatchmediaHelper
{
    public partial class FormOptions : Form
    {
        public FormOptions()
        {
            InitializeComponent();
            tbWriteTimeout.DataBindings.Add(new Binding("Text", Properties.Settings.Default, "ReplayWriteTimeout"));
            tbNotificationDuration.DataBindings.Add(new Binding("Text", Properties.Settings.Default, "ReminderDuration"));
            tbNotificationInterval.DataBindings.Add(new Binding("Text", Properties.Settings.Default, "ReminderInterval"));
            numericJpgQuality.DataBindings.Add(new Binding("Value", Properties.Settings.Default, "JpegQuality"));
            cmbUpdateChannel.DataBindings.Add(new Binding("SelectedItem", Properties.Settings.Default, "SelectedUpdateChannel"));
            cmbUpdateChannel.DataSource = Properties.Settings.Default.AvailableUpdateChannels;
        }

        private void FormOptions_FormClosing(object sender, FormClosingEventArgs e)
        {
            Properties.Settings.Default.Save();
        }
    }
}
